What failure can kill a long running IRC client? [closed]
        Posted  
        
            by 
                Xeoncross
            
        on Programmers
        
        See other posts from Programmers
        
            or by Xeoncross
        
        
        
        Published on 2012-10-23T16:02:18Z
        Indexed on 
            2012/10/23
            17:19 UTC
        
        
        Read the original article
        Hit count: 305
        
I have an IRC bot that I built in PHP using sockets that attempts to run forever and (if disconnected) reconnects again. I have it listening to several channels. Apparently it's fairly resilient, because it can run for several days before the process ends and CRON has to start it up again.
However, based on the fact the process ends I'm assuming there are other conditions I'm not accounting for that are causing problems. I have nothing in my error logs giving me a hint.
In addition, sometimes the process will continue running - but I notice it's no longer present in any of the channels on the IRC server which makes me think it violated some part of the protocol.
I have logic setup to handle:
- reply to PING's correctly
 - reconnect on disconnect (and reconnect to channels)
 - respond to private messages (so someone doesn't ban it)
 - prevent memory leaks
 
What other failure could be killing my long-running IRC client?
© Programmers or respective owner